/**
 * 
 */
package com.cqan.system.controller;

import static com.cqan.common.ViewName.*;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.cqan.controller.BaseController;
import com.cqan.orm.PropertyFilter;
import com.cqan.system.entity.VersionUpgrade;
import com.cqan.system.service.VersionUpgradeService;

/**
 * @Description 版本升级控制器
 * @author slaton.wu@gmail.com
 * @date 2012-7-9下午7:46:01
 * 
 */
@Controller
@RequestMapping("/version")
public class VersionUpgradeController extends BaseController<VersionUpgrade> {

	@Resource(name = "versionUpgradeService")
	private VersionUpgradeService versionUpgradeService;

	@RequestMapping(value = "/list.htm")
	public ModelAndView upgrade(Integer pageNo,HttpServletRequest request) {
		ModelAndView mav = new ModelAndView(VERSION_LIST);
		List<PropertyFilter> filters = PropertyFilter.buildFromHttpRequest(request);
		page.setPageNo(pageNo);
		page = versionUpgradeService.search(page, filters);
		mav.addObject("page", page);
		return mav;
	}
}
